package de.g18.it0a.jlaser.exception;

import de.g18.it0a.jlaser.domain.Position;


public class IllegalPositionException extends Exception {

    private static final long serialVersionUID = 1L;


    private final Position position;


    public IllegalPositionException(Position aPosition) {
        this(aPosition.toString() + " is not a valid position!", aPosition);
    }

    public IllegalPositionException(String aMessage, Position aPosition) {
        super(aMessage);
        position = aPosition;
    }

    public Position getPosition() {
        return position;
    }
}
